package com.csy.bservice.controller;

import com.csy.bservice.feign.BFegin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/bservice")
public class BController {

    @Autowired
    private BFegin bFegin;

    @RequestMapping("/getC")
    public String getCService(){
        System.out.println("--------BService");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        String cService = bFegin.getCService();
        return "--BBBBBService \n" + cService;
    }


}
